package com.saxon.controller;


import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.saxon.pojo.User;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;


@RestController
public class MyController {
    @RequestMapping ("/hello")//详相当于servletmappering
    public List<User> hello ()  {
        List<User> list=new ArrayList<> ();
        list.add (new User (1,"saxon",12));
        list.add (new User (2,"saxon",12));
        list.add (new User (3,"saxon",12));
        list.add (new User (4,"saxon",12));
        return list;
    }
}
